{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport raf from \"rc-util/es/raf\";\nimport contains from \"rc-util/es/Dom/contains\";\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport Portal from \"rc-util/es/Portal\";\nimport classNames from 'classnames';\nimport { getAlignFromPlacement, getAlignPopupClassName } from \"./utils/alignUtil\";\nimport Popup from \"./Popup\";\nimport TriggerContext from \"./context\";\nfunction noop() {}\nfunction returnEmptyString() {\n  return '';\n}\nfunction returnDocument(element) {\n  if (element) {\n    return element.ownerDocument;\n  }\n  return window.document;\n}\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\n/**\n * Internal usage. Do not use in your code since this will be removed.\n */\nexport function generateTrigger(PortalComponent) {\n  var Trigger = /*#__PURE__*/function (_React$Component) {\n    _inherits(Trigger, _React$Component);\n    var _super = _createSuper(Trigger);\n\n    // ensure `getContainer` will be called only once\n    function Trigger(props) {\n      var _this;\n      _classCallCheck(this, Trigger);\n      _this = _super.call(this, props);\n      _defineProperty(_assertThisInitialized(_this), \"popupRef\", /*#__PURE__*/React.createRef());\n      _defineProperty(_assertThisInitialized(_this), \"triggerRef\", /*#__PURE__*/React.createRef());\n      _defineProperty(_assertThisInitialized(_this), \"portalContainer\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"attachId\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"clickOutsideHandler\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"touchOutsideHandler\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler1\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler2\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"mouseDownTimeout\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"focusTime\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"preClickTime\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"preTouchTime\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"delayTimer\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"hasPopupMouseDown\", void 0);\n      _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function (e) {\n        var mouseEnterDelay = _this.props.mouseEnterDelay;\n        _this.fireEvents('onMouseEnter', e);\n        _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onMouseMove\", function (e) {\n        _this.fireEvents('onMouseMove', e);\n        _this.setPoint(e);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function (e) {\n        _this.fireEvents('onMouseLeave', e);\n        _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseEnter\", function () {\n        _this.clearDelayTimer();\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseLeave\", function (e) {\n        var _this$popupRef$curren;\n\n        // https://github.com/react-component/trigger/pull/13\n        // react bug?\n        if (e.relatedTarget && !e.relatedTarget.setTimeout && contains((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n          return;\n        }\n        _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onFocus\", function (e) {\n        _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n        _this.clearDelayTimer();\n        if (_this.isFocusToShow()) {\n          _this.focusTime = Date.now();\n          _this.delaySetPopupVisible(true, _this.props.focusDelay);\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n        _this.fireEvents('onMouseDown', e);\n        _this.preClickTime = Date.now();\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n        _this.fireEvents('onTouchStart', e);\n        _this.preTouchTime = Date.now();\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onBlur\", function (e) {\n        _this.fireEvents('onBlur', e);\n        _this.clearDelayTimer();\n        if (_this.isBlurToHide()) {\n          _this.delaySetPopupVisible(false, _this.props.blurDelay);\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onContextMenu\", function (e) {\n        e.preventDefault();\n        _this.fireEvents('onContextMenu', e);\n        _this.setPopupVisible(true, e);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onContextMenuClose\", function () {\n        if (_this.isContextMenuToShow()) {\n          _this.close();\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n        _this.fireEvents('onClick', event); // focus will trigger click\n\n        if (_this.focusTime) {\n          var preTime;\n          if (_this.preClickTime && _this.preTouchTime) {\n            preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n          } else if (_this.preClickTime) {\n            preTime = _this.preClickTime;\n          } else if (_this.preTouchTime) {\n            preTime = _this.preTouchTime;\n          }\n          if (Math.abs(preTime - _this.focusTime) < 20) {\n            return;\n          }\n          _this.focusTime = 0;\n        }\n        _this.preClickTime = 0;\n        _this.preTouchTime = 0; // Only prevent default when all the action is click.\n        // https://github.com/ant-design/ant-design/issues/17043\n        // https://github.com/ant-design/ant-design/issues/17291\n\n        if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n          event.preventDefault();\n        }\n        var nextVisible = !_this.state.popupVisible;\n        if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n          _this.setPopupVisible(!_this.state.popupVisible, event);\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseDown\", function () {\n        _this.hasPopupMouseDown = true;\n        clearTimeout(_this.mouseDownTimeout);\n        _this.mouseDownTimeout = window.setTimeout(function () {\n          _this.hasPopupMouseDown = false;\n        }, 0);\n        if (_this.context) {\n          var _this$context;\n          (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"onDocumentClick\", function (event) {\n        if (_this.props.mask && !_this.props.maskClosable) {\n          return;\n        }\n        var target = event.target;\n        var root = _this.getRootDomNode();\n        var popupNode = _this.getPopupDomNode();\n        if (\n        // mousedown on the target should also close popup when action is contextMenu.\n        // https://github.com/ant-design/ant-design/issues/29853\n        (!contains(root, target) || _this.isContextMenuOnly()) && !contains(popupNode, target) && !_this.hasPopupMouseDown) {\n          _this.close();\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"getRootDomNode\", function () {\n        var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n        if (getTriggerDOMNode) {\n          return getTriggerDOMNode(_this.triggerRef.current);\n        }\n        try {\n          var domNode = findDOMNode(_this.triggerRef.current);\n          if (domNode) {\n            return domNode;\n          }\n        } catch (err) {// Do nothing\n        }\n        return ReactDOM.findDOMNode(_assertThisInitialized(_this));\n      });\n      _defineProperty(_assertThisInitialized(_this), \"getPopupClassNameFromAlign\", function (align) {\n        var className = [];\n        var _this$props = _this.props,\n          popupPlacement = _this$props.popupPlacement,\n          builtinPlacements = _this$props.builtinPlacements,\n          prefixCls = _this$props.prefixCls,\n          alignPoint = _this$props.alignPoint,\n          getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n        if (popupPlacement && builtinPlacements) {\n          className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n        }\n        if (getPopupClassNameFromAlign) {\n          className.push(getPopupClassNameFromAlign(align));\n        }\n        return className.join(' ');\n      });\n      _defineProperty(_assertThisInitialized(_this), \"getComponent\", function () {\n        var _this$props2 = _this.props,\n          prefixCls = _this$props2.prefixCls,\n          destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n          popupClassName = _this$props2.popupClassName,\n          onPopupAlign = _this$props2.onPopupAlign,\n          popupMotion = _this$props2.popupMotion,\n          popupAnimation = _this$props2.popupAnimation,\n          popupTransitionName = _this$props2.popupTransitionName,\n          popupStyle = _this$props2.popupStyle,\n          mask = _this$props2.mask,\n          maskAnimation = _this$props2.maskAnimation,\n          maskTransitionName = _this$props2.maskTransitionName,\n          maskMotion = _this$props2.maskMotion,\n          zIndex = _this$props2.zIndex,\n          popup = _this$props2.popup,\n          stretch = _this$props2.stretch,\n          alignPoint = _this$props2.alignPoint,\n          mobile = _this$props2.mobile,\n          forceRender = _this$props2.forceRender,\n          onPopupClick = _this$props2.onPopupClick;\n        var _this$state = _this.state,\n          popupVisible = _this$state.popupVisible,\n          point = _this$state.point;\n        var align = _this.getPopupAlign();\n        var mouseProps = {};\n        if (_this.isMouseEnterToShow()) {\n          mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n        }\n        if (_this.isMouseLeaveToHide()) {\n          mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n        }\n        mouseProps.onMouseDown = _this.onPopupMouseDown;\n        mouseProps.onTouchStart = _this.onPopupMouseDown;\n        return /*#__PURE__*/React.createElement(Popup, _extends({\n          prefixCls: prefixCls,\n          destroyPopupOnHide: destroyPopupOnHide,\n          visible: popupVisible,\n          point: alignPoint && point,\n          className: popupClassName,\n          align: align,\n          onAlign: onPopupAlign,\n          animation: popupAnimation,\n          getClassNameFromAlign: _this.getPopupClassNameFromAlign\n        }, mouseProps, {\n          stretch: stretch,\n          getRootDomNode: _this.getRootDomNode,\n          style: popupStyle,\n          mask: mask,\n          zIndex: zIndex,\n          transitionName: popupTransitionName,\n          maskAnimation: maskAnimation,\n          maskTransitionName: maskTransitionName,\n          maskMotion: maskMotion,\n          ref: _this.popupRef,\n          motion: popupMotion,\n          mobile: mobile,\n          forceRender: forceRender,\n          onClick: onPopupClick\n        }), typeof popup === 'function' ? popup() : popup);\n      });\n      _defineProperty(_assertThisInitialized(_this), \"attachParent\", function (popupContainer) {\n        raf.cancel(_this.attachId);\n        var _this$props3 = _this.props,\n          getPopupContainer = _this$props3.getPopupContainer,\n          getDocument = _this$props3.getDocument;\n        var domNode = _this.getRootDomNode();\n        var mountNode;\n        if (!getPopupContainer) {\n          mountNode = getDocument(_this.getRootDomNode()).body;\n        } else if (domNode || getPopupContainer.length === 0) {\n          // Compatible for legacy getPopupContainer with domNode argument.\n          // If no need `domNode` argument, will call directly.\n          // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n          mountNode = getPopupContainer(domNode);\n        }\n        if (mountNode) {\n          mountNode.appendChild(popupContainer);\n        } else {\n          // Retry after frame render in case parent not ready\n          _this.attachId = raf(function () {\n            _this.attachParent(popupContainer);\n          });\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"getContainer\", function () {\n        if (!_this.portalContainer) {\n          // In React.StrictMode component will call render multiple time in first mount.\n          // When you want to refactor with FC, useRef will also init multiple time and\n          // point to different useRef instance which will create multiple element\n          // (This multiple render will not trigger effect so you can not clean up this\n          // in effect). But this is safe with class component since it always point to same class instance.\n          var getDocument = _this.props.getDocument;\n          var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n          // https://github.com/react-component/trigger/issues/41\n\n          popupContainer.style.position = 'absolute';\n          popupContainer.style.top = '0';\n          popupContainer.style.left = '0';\n          popupContainer.style.width = '100%';\n          _this.portalContainer = popupContainer;\n        }\n        _this.attachParent(_this.portalContainer);\n        return _this.portalContainer;\n      });\n      _defineProperty(_assertThisInitialized(_this), \"setPoint\", function (point) {\n        var alignPoint = _this.props.alignPoint;\n        if (!alignPoint || !point) return;\n        _this.setState({\n          point: {\n            pageX: point.pageX,\n            pageY: point.pageY\n          }\n        });\n      });\n      _defineProperty(_assertThisInitialized(_this), \"handlePortalUpdate\", function () {\n        if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n          _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n        }\n      });\n      _defineProperty(_assertThisInitialized(_this), \"triggerContextValue\", {\n        onPopupMouseDown: _this.onPopupMouseDown\n      });\n      var _popupVisible;\n      if ('popupVisible' in props) {\n        _popupVisible = !!props.popupVisible;\n      } else {\n        _popupVisible = !!props.defaultPopupVisible;\n      }\n      _this.state = {\n        prevPopupVisible: _popupVisible,\n        popupVisible: _popupVisible\n      };\n      ALL_HANDLERS.forEach(function (h) {\n        _this[\"fire\".concat(h)] = function (e) {\n          _this.fireEvents(h, e);\n        };\n      });\n      return _this;\n    }\n    _createClass(Trigger, [{\n      key: \"componentDidMount\",\n      value: function componentDidMount() {\n        this.componentDidUpdate();\n      }\n    }, {\n      key: \"componentDidUpdate\",\n      value: function componentDidUpdate() {\n        var props = this.props;\n        var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n        // https://github.com/ant-design/ant-design/issues/5804\n        // https://github.com/react-component/calendar/issues/250\n        // https://github.com/react-component/trigger/issues/50\n\n        if (state.popupVisible) {\n          var currentDocument;\n          if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n            currentDocument = props.getDocument(this.getRootDomNode());\n            this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n          } // always hide on mobile\n\n          if (!this.touchOutsideHandler) {\n            currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n            this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n          } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n          if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n            currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n            this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n          } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n          if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n            this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n          }\n          return;\n        }\n        this.clearOutsideHandler();\n      }\n    }, {\n      key: \"componentWillUnmount\",\n      value: function componentWillUnmount() {\n        this.clearDelayTimer();\n        this.clearOutsideHandler();\n        clearTimeout(this.mouseDownTimeout);\n        raf.cancel(this.attachId);\n      }\n    }, {\n      key: \"getPopupDomNode\",\n      value: function getPopupDomNode() {\n        var _this$popupRef$curren2;\n\n        // for test\n        return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n      }\n    }, {\n      key: \"getPopupAlign\",\n      value: function getPopupAlign() {\n        var props = this.props;\n        var popupPlacement = props.popupPlacement,\n          popupAlign = props.popupAlign,\n          builtinPlacements = props.builtinPlacements;\n        if (popupPlacement && builtinPlacements) {\n          return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n        }\n        return popupAlign;\n      }\n    }, {\n      key: \"setPopupVisible\",\n      value:\n      /**\n       * @param popupVisible    Show or not the popup element\n       * @param event           SyntheticEvent, used for `pointAlign`\n       */\n      function setPopupVisible(popupVisible, event) {\n        var alignPoint = this.props.alignPoint;\n        var prevPopupVisible = this.state.popupVisible;\n        this.clearDelayTimer();\n        if (prevPopupVisible !== popupVisible) {\n          if (!('popupVisible' in this.props)) {\n            this.setState({\n              popupVisible: popupVisible,\n              prevPopupVisible: prevPopupVisible\n            });\n          }\n          this.props.onPopupVisibleChange(popupVisible);\n        } // Always record the point position since mouseEnterDelay will delay the show\n\n        if (alignPoint && event && popupVisible) {\n          this.setPoint(event);\n        }\n      }\n    }, {\n      key: \"delaySetPopupVisible\",\n      value: function delaySetPopupVisible(visible, delayS, event) {\n        var _this2 = this;\n        var delay = delayS * 1000;\n        this.clearDelayTimer();\n        if (delay) {\n          var point = event ? {\n            pageX: event.pageX,\n            pageY: event.pageY\n          } : null;\n          this.delayTimer = window.setTimeout(function () {\n            _this2.setPopupVisible(visible, point);\n            _this2.clearDelayTimer();\n          }, delay);\n        } else {\n          this.setPopupVisible(visible, event);\n        }\n      }\n    }, {\n      key: \"clearDelayTimer\",\n      value: function clearDelayTimer() {\n        if (this.delayTimer) {\n          clearTimeout(this.delayTimer);\n          this.delayTimer = null;\n        }\n      }\n    }, {\n      key: \"clearOutsideHandler\",\n      value: function clearOutsideHandler() {\n        if (this.clickOutsideHandler) {\n          this.clickOutsideHandler.remove();\n          this.clickOutsideHandler = null;\n        }\n        if (this.contextMenuOutsideHandler1) {\n          this.contextMenuOutsideHandler1.remove();\n          this.contextMenuOutsideHandler1 = null;\n        }\n        if (this.contextMenuOutsideHandler2) {\n          this.contextMenuOutsideHandler2.remove();\n          this.contextMenuOutsideHandler2 = null;\n        }\n        if (this.touchOutsideHandler) {\n          this.touchOutsideHandler.remove();\n          this.touchOutsideHandler = null;\n        }\n      }\n    }, {\n      key: \"createTwoChains\",\n      value: function createTwoChains(event) {\n        var childPros = this.props.children.props;\n        var props = this.props;\n        if (childPros[event] && props[event]) {\n          return this[\"fire\".concat(event)];\n        }\n        return childPros[event] || props[event];\n      }\n    }, {\n      key: \"isClickToShow\",\n      value: function isClickToShow() {\n        var _this$props4 = this.props,\n          action = _this$props4.action,\n          showAction = _this$props4.showAction;\n        return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n      }\n    }, {\n      key: \"isContextMenuOnly\",\n      value: function isContextMenuOnly() {\n        var action = this.props.action;\n        return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n      }\n    }, {\n      key: \"isContextMenuToShow\",\n      value: function isContextMenuToShow() {\n        var _this$props5 = this.props,\n          action = _this$props5.action,\n          showAction = _this$props5.showAction;\n        return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n      }\n    }, {\n      key: \"isClickToHide\",\n      value: function isClickToHide() {\n        var _this$props6 = this.props,\n          action = _this$props6.action,\n          hideAction = _this$props6.hideAction;\n        return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n      }\n    }, {\n      key: \"isMouseEnterToShow\",\n      value: function isMouseEnterToShow() {\n        var _this$props7 = this.props,\n          action = _this$props7.action,\n          showAction = _this$props7.showAction;\n        return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n      }\n    }, {\n      key: \"isMouseLeaveToHide\",\n      value: function isMouseLeaveToHide() {\n        var _this$props8 = this.props,\n          action = _this$props8.action,\n          hideAction = _this$props8.hideAction;\n        return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n      }\n    }, {\n      key: \"isFocusToShow\",\n      value: function isFocusToShow() {\n        var _this$props9 = this.props,\n          action = _this$props9.action,\n          showAction = _this$props9.showAction;\n        return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n      }\n    }, {\n      key: \"isBlurToHide\",\n      value: function isBlurToHide() {\n        var _this$props10 = this.props,\n          action = _this$props10.action,\n          hideAction = _this$props10.hideAction;\n        return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n      }\n    }, {\n      key: \"forcePopupAlign\",\n      value: function forcePopupAlign() {\n        if (this.state.popupVisible) {\n          var _this$popupRef$curren3;\n          (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n        }\n      }\n    }, {\n      key: \"fireEvents\",\n      value: function fireEvents(type, e) {\n        var childCallback = this.props.children.props[type];\n        if (childCallback) {\n          childCallback(e);\n        }\n        var callback = this.props[type];\n        if (callback) {\n          callback(e);\n        }\n      }\n    }, {\n      key: \"close\",\n      value: function close() {\n        this.setPopupVisible(false);\n      }\n    }, {\n      key: \"render\",\n      value: function render() {\n        var popupVisible = this.state.popupVisible;\n        var _this$props11 = this.props,\n          children = _this$props11.children,\n          forceRender = _this$props11.forceRender,\n          alignPoint = _this$props11.alignPoint,\n          className = _this$props11.className,\n          autoDestroy = _this$props11.autoDestroy;\n        var child = React.Children.only(children);\n        var newChildProps = {\n          key: 'trigger'\n        }; // ============================== Visible Handlers ==============================\n        // >>> ContextMenu\n\n        if (this.isContextMenuToShow()) {\n          newChildProps.onContextMenu = this.onContextMenu;\n        } else {\n          newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n        } // >>> Click\n\n        if (this.isClickToHide() || this.isClickToShow()) {\n          newChildProps.onClick = this.onClick;\n          newChildProps.onMouseDown = this.onMouseDown;\n          newChildProps.onTouchStart = this.onTouchStart;\n        } else {\n          newChildProps.onClick = this.createTwoChains('onClick');\n          newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n          newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n        } // >>> Hover(enter)\n\n        if (this.isMouseEnterToShow()) {\n          newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n          if (alignPoint) {\n            newChildProps.onMouseMove = this.onMouseMove;\n          }\n        } else {\n          newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n        } // >>> Hover(leave)\n\n        if (this.isMouseLeaveToHide()) {\n          newChildProps.onMouseLeave = this.onMouseLeave;\n        } else {\n          newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n        } // >>> Focus\n\n        if (this.isFocusToShow() || this.isBlurToHide()) {\n          newChildProps.onFocus = this.onFocus;\n          newChildProps.onBlur = this.onBlur;\n        } else {\n          newChildProps.onFocus = this.createTwoChains('onFocus');\n          newChildProps.onBlur = this.createTwoChains('onBlur');\n        } // =================================== Render ===================================\n\n        var childrenClassName = classNames(child && child.props && child.props.className, className);\n        if (childrenClassName) {\n          newChildProps.className = childrenClassName;\n        }\n        var cloneProps = _objectSpread({}, newChildProps);\n        if (supportRef(child)) {\n          cloneProps.ref = composeRef(this.triggerRef, child.ref);\n        }\n        var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n        var portal; // prevent unmounting after it's rendered\n\n        if (popupVisible || this.popupRef.current || forceRender) {\n          portal = /*#__PURE__*/React.createElement(PortalComponent, {\n            key: \"portal\",\n            getContainer: this.getContainer,\n            didUpdate: this.handlePortalUpdate\n          }, this.getComponent());\n        }\n        if (!popupVisible && autoDestroy) {\n          portal = null;\n        }\n        return /*#__PURE__*/React.createElement(TriggerContext.Provider, {\n          value: this.triggerContextValue\n        }, trigger, portal);\n      }\n    }], [{\n      key: \"getDerivedStateFromProps\",\n      value: function getDerivedStateFromProps(_ref, prevState) {\n        var popupVisible = _ref.popupVisible;\n        var newState = {};\n        if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n          newState.popupVisible = popupVisible;\n          newState.prevPopupVisible = prevState.popupVisible;\n        }\n        return newState;\n      }\n    }]);\n    return Trigger;\n  }(React.Component);\n  _defineProperty(Trigger, \"contextType\", TriggerContext);\n  _defineProperty(Trigger, \"defaultProps\", {\n    prefixCls: 'rc-trigger-popup',\n    getPopupClassNameFromAlign: returnEmptyString,\n    getDocument: returnDocument,\n    onPopupVisibleChange: noop,\n    afterPopupVisibleChange: noop,\n    onPopupAlign: noop,\n    popupClassName: '',\n    mouseEnterDelay: 0,\n    mouseLeaveDelay: 0.1,\n    focusDelay: 0,\n    blurDelay: 0.15,\n    popupStyle: {},\n    destroyPopupOnHide: false,\n    popupAlign: {},\n    defaultPopupVisible: false,\n    mask: false,\n    maskClosable: true,\n    action: [],\n    showAction: [],\n    hideAction: [],\n    autoDestroy: false\n  });\n  return Trigger;\n}\nexport default generateTrigger(Portal);","map":{"version":3,"names":["_objectSpread","_extends","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","_defineProperty","React","ReactDOM","raf","contains","findDOMNode","composeRef","supportRef","addEventListener","Portal","classNames","getAlignFromPlacement","getAlignPopupClassName","Popup","TriggerContext","noop","returnEmptyString","returnDocument","element","ownerDocument","window","document","ALL_HANDLERS","generateTrigger","PortalComponent","Trigger","_React$Component","_super","props","_this","call","createRef","e","mouseEnterDelay","fireEvents","delaySetPopupVisible","setPoint","mouseLeaveDelay","clearDelayTimer","_this$popupRef$curren","relatedTarget","setTimeout","popupRef","current","getElement","isFocusToShow","focusTime","Date","now","focusDelay","preClickTime","preTouchTime","isBlurToHide","blurDelay","preventDefault","setPopupVisible","isContextMenuToShow","close","event","preTime","Math","min","abs","isClickToShow","isClickToHide","nextVisible","state","popupVisible","hasPopupMouseDown","clearTimeout","mouseDownTimeout","context","_this$context","onPopupMouseDown","apply","arguments","mask","maskClosable","target","root","getRootDomNode","popupNode","getPopupDomNode","isContextMenuOnly","getTriggerDOMNode","triggerRef","domNode","err","align","className","_this$props","popupPlacement","builtinPlacements","prefixCls","alignPoint","getPopupClassNameFromAlign","push","join","_this$props2","destroyPopupOnHide","popupClassName","onPopupAlign","popupMotion","popupAnimation","popupTransitionName","popupStyle","maskAnimation","maskTransitionName","maskMotion","zIndex","popup","stretch","mobile","forceRender","onPopupClick","_this$state","point","getPopupAlign","mouseProps","isMouseEnterToShow","onMouseEnter","onPopupMouseEnter","isMouseLeaveToHide","onMouseLeave","onPopupMouseLeave","onMouseDown","onTouchStart","createElement","visible","onAlign","animation","getClassNameFromAlign","style","transitionName","ref","motion","onClick","popupContainer","cancel","attachId","_this$props3","getPopupContainer","getDocument","mountNode","body","length","appendChild","attachParent","portalContainer","position","top","left","width","setState","pageX","pageY","prevPopupVisible","afterPopupVisibleChange","_popupVisible","defaultPopupVisible","forEach","h","concat","key","value","componentDidMount","componentDidUpdate","currentDocument","clickOutsideHandler","onDocumentClick","touchOutsideHandler","contextMenuOutsideHandler1","onContextMenuClose","contextMenuOutsideHandler2","clearOutsideHandler","componentWillUnmount","_this$popupRef$curren2","popupAlign","onPopupVisibleChange","delayS","_this2","delay","delayTimer","remove","createTwoChains","childPros","children","_this$props4","action","showAction","indexOf","_this$props5","_this$props6","hideAction","_this$props7","_this$props8","_this$props9","_this$props10","forcePopupAlign","_this$popupRef$curren3","forceAlign","type","childCallback","callback","render","_this$props11","autoDestroy","child","Children","only","newChildProps","onContextMenu","onMouseMove","onFocus","onBlur","childrenClassName","cloneProps","trigger","cloneElement","portal","getContainer","didUpdate","handlePortalUpdate","getComponent","Provider","triggerContextValue","getDerivedStateFromProps","_ref","prevState","newState","undefined","Component"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-trigger/es/index.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport raf from \"rc-util/es/raf\";\nimport contains from \"rc-util/es/Dom/contains\";\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport Portal from \"rc-util/es/Portal\";\nimport classNames from 'classnames';\nimport { getAlignFromPlacement, getAlignPopupClassName } from \"./utils/alignUtil\";\nimport Popup from \"./Popup\";\nimport TriggerContext from \"./context\";\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n  return '';\n}\n\nfunction returnDocument(element) {\n  if (element) {\n    return element.ownerDocument;\n  }\n\n  return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\n/**\n * Internal usage. Do not use in your code since this will be removed.\n */\nexport function generateTrigger(PortalComponent) {\n  var Trigger = /*#__PURE__*/function (_React$Component) {\n    _inherits(Trigger, _React$Component);\n\n    var _super = _createSuper(Trigger);\n\n    // ensure `getContainer` will be called only once\n    function Trigger(props) {\n      var _this;\n\n      _classCallCheck(this, Trigger);\n\n      _this = _super.call(this, props);\n\n      _defineProperty(_assertThisInitialized(_this), \"popupRef\", /*#__PURE__*/React.createRef());\n\n      _defineProperty(_assertThisInitialized(_this), \"triggerRef\", /*#__PURE__*/React.createRef());\n\n      _defineProperty(_assertThisInitialized(_this), \"portalContainer\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"attachId\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"clickOutsideHandler\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"touchOutsideHandler\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler1\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler2\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"mouseDownTimeout\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"focusTime\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"preClickTime\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"preTouchTime\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"delayTimer\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"hasPopupMouseDown\", void 0);\n\n      _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function (e) {\n        var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n        _this.fireEvents('onMouseEnter', e);\n\n        _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onMouseMove\", function (e) {\n        _this.fireEvents('onMouseMove', e);\n\n        _this.setPoint(e);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function (e) {\n        _this.fireEvents('onMouseLeave', e);\n\n        _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseEnter\", function () {\n        _this.clearDelayTimer();\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseLeave\", function (e) {\n        var _this$popupRef$curren;\n\n        // https://github.com/react-component/trigger/pull/13\n        // react bug?\n        if (e.relatedTarget && !e.relatedTarget.setTimeout && contains((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n          return;\n        }\n\n        _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onFocus\", function (e) {\n        _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n        _this.clearDelayTimer();\n\n        if (_this.isFocusToShow()) {\n          _this.focusTime = Date.now();\n\n          _this.delaySetPopupVisible(true, _this.props.focusDelay);\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n        _this.fireEvents('onMouseDown', e);\n\n        _this.preClickTime = Date.now();\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n        _this.fireEvents('onTouchStart', e);\n\n        _this.preTouchTime = Date.now();\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onBlur\", function (e) {\n        _this.fireEvents('onBlur', e);\n\n        _this.clearDelayTimer();\n\n        if (_this.isBlurToHide()) {\n          _this.delaySetPopupVisible(false, _this.props.blurDelay);\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onContextMenu\", function (e) {\n        e.preventDefault();\n\n        _this.fireEvents('onContextMenu', e);\n\n        _this.setPopupVisible(true, e);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onContextMenuClose\", function () {\n        if (_this.isContextMenuToShow()) {\n          _this.close();\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n        _this.fireEvents('onClick', event); // focus will trigger click\n\n\n        if (_this.focusTime) {\n          var preTime;\n\n          if (_this.preClickTime && _this.preTouchTime) {\n            preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n          } else if (_this.preClickTime) {\n            preTime = _this.preClickTime;\n          } else if (_this.preTouchTime) {\n            preTime = _this.preTouchTime;\n          }\n\n          if (Math.abs(preTime - _this.focusTime) < 20) {\n            return;\n          }\n\n          _this.focusTime = 0;\n        }\n\n        _this.preClickTime = 0;\n        _this.preTouchTime = 0; // Only prevent default when all the action is click.\n        // https://github.com/ant-design/ant-design/issues/17043\n        // https://github.com/ant-design/ant-design/issues/17291\n\n        if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n          event.preventDefault();\n        }\n\n        var nextVisible = !_this.state.popupVisible;\n\n        if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n          _this.setPopupVisible(!_this.state.popupVisible, event);\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onPopupMouseDown\", function () {\n        _this.hasPopupMouseDown = true;\n        clearTimeout(_this.mouseDownTimeout);\n        _this.mouseDownTimeout = window.setTimeout(function () {\n          _this.hasPopupMouseDown = false;\n        }, 0);\n\n        if (_this.context) {\n          var _this$context;\n\n          (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"onDocumentClick\", function (event) {\n        if (_this.props.mask && !_this.props.maskClosable) {\n          return;\n        }\n\n        var target = event.target;\n\n        var root = _this.getRootDomNode();\n\n        var popupNode = _this.getPopupDomNode();\n\n        if ( // mousedown on the target should also close popup when action is contextMenu.\n        // https://github.com/ant-design/ant-design/issues/29853\n        (!contains(root, target) || _this.isContextMenuOnly()) && !contains(popupNode, target) && !_this.hasPopupMouseDown) {\n          _this.close();\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"getRootDomNode\", function () {\n        var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n        if (getTriggerDOMNode) {\n          return getTriggerDOMNode(_this.triggerRef.current);\n        }\n\n        try {\n          var domNode = findDOMNode(_this.triggerRef.current);\n\n          if (domNode) {\n            return domNode;\n          }\n        } catch (err) {// Do nothing\n        }\n\n        return ReactDOM.findDOMNode(_assertThisInitialized(_this));\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"getPopupClassNameFromAlign\", function (align) {\n        var className = [];\n        var _this$props = _this.props,\n            popupPlacement = _this$props.popupPlacement,\n            builtinPlacements = _this$props.builtinPlacements,\n            prefixCls = _this$props.prefixCls,\n            alignPoint = _this$props.alignPoint,\n            getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n        if (popupPlacement && builtinPlacements) {\n          className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n        }\n\n        if (getPopupClassNameFromAlign) {\n          className.push(getPopupClassNameFromAlign(align));\n        }\n\n        return className.join(' ');\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"getComponent\", function () {\n        var _this$props2 = _this.props,\n            prefixCls = _this$props2.prefixCls,\n            destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n            popupClassName = _this$props2.popupClassName,\n            onPopupAlign = _this$props2.onPopupAlign,\n            popupMotion = _this$props2.popupMotion,\n            popupAnimation = _this$props2.popupAnimation,\n            popupTransitionName = _this$props2.popupTransitionName,\n            popupStyle = _this$props2.popupStyle,\n            mask = _this$props2.mask,\n            maskAnimation = _this$props2.maskAnimation,\n            maskTransitionName = _this$props2.maskTransitionName,\n            maskMotion = _this$props2.maskMotion,\n            zIndex = _this$props2.zIndex,\n            popup = _this$props2.popup,\n            stretch = _this$props2.stretch,\n            alignPoint = _this$props2.alignPoint,\n            mobile = _this$props2.mobile,\n            forceRender = _this$props2.forceRender,\n            onPopupClick = _this$props2.onPopupClick;\n        var _this$state = _this.state,\n            popupVisible = _this$state.popupVisible,\n            point = _this$state.point;\n\n        var align = _this.getPopupAlign();\n\n        var mouseProps = {};\n\n        if (_this.isMouseEnterToShow()) {\n          mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n        }\n\n        if (_this.isMouseLeaveToHide()) {\n          mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n        }\n\n        mouseProps.onMouseDown = _this.onPopupMouseDown;\n        mouseProps.onTouchStart = _this.onPopupMouseDown;\n        return /*#__PURE__*/React.createElement(Popup, _extends({\n          prefixCls: prefixCls,\n          destroyPopupOnHide: destroyPopupOnHide,\n          visible: popupVisible,\n          point: alignPoint && point,\n          className: popupClassName,\n          align: align,\n          onAlign: onPopupAlign,\n          animation: popupAnimation,\n          getClassNameFromAlign: _this.getPopupClassNameFromAlign\n        }, mouseProps, {\n          stretch: stretch,\n          getRootDomNode: _this.getRootDomNode,\n          style: popupStyle,\n          mask: mask,\n          zIndex: zIndex,\n          transitionName: popupTransitionName,\n          maskAnimation: maskAnimation,\n          maskTransitionName: maskTransitionName,\n          maskMotion: maskMotion,\n          ref: _this.popupRef,\n          motion: popupMotion,\n          mobile: mobile,\n          forceRender: forceRender,\n          onClick: onPopupClick\n        }), typeof popup === 'function' ? popup() : popup);\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"attachParent\", function (popupContainer) {\n        raf.cancel(_this.attachId);\n        var _this$props3 = _this.props,\n            getPopupContainer = _this$props3.getPopupContainer,\n            getDocument = _this$props3.getDocument;\n\n        var domNode = _this.getRootDomNode();\n\n        var mountNode;\n\n        if (!getPopupContainer) {\n          mountNode = getDocument(_this.getRootDomNode()).body;\n        } else if (domNode || getPopupContainer.length === 0) {\n          // Compatible for legacy getPopupContainer with domNode argument.\n          // If no need `domNode` argument, will call directly.\n          // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n          mountNode = getPopupContainer(domNode);\n        }\n\n        if (mountNode) {\n          mountNode.appendChild(popupContainer);\n        } else {\n          // Retry after frame render in case parent not ready\n          _this.attachId = raf(function () {\n            _this.attachParent(popupContainer);\n          });\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"getContainer\", function () {\n        if (!_this.portalContainer) {\n          // In React.StrictMode component will call render multiple time in first mount.\n          // When you want to refactor with FC, useRef will also init multiple time and\n          // point to different useRef instance which will create multiple element\n          // (This multiple render will not trigger effect so you can not clean up this\n          // in effect). But this is safe with class component since it always point to same class instance.\n          var getDocument = _this.props.getDocument;\n          var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n          // https://github.com/react-component/trigger/issues/41\n\n          popupContainer.style.position = 'absolute';\n          popupContainer.style.top = '0';\n          popupContainer.style.left = '0';\n          popupContainer.style.width = '100%';\n          _this.portalContainer = popupContainer;\n        }\n\n        _this.attachParent(_this.portalContainer);\n\n        return _this.portalContainer;\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"setPoint\", function (point) {\n        var alignPoint = _this.props.alignPoint;\n        if (!alignPoint || !point) return;\n\n        _this.setState({\n          point: {\n            pageX: point.pageX,\n            pageY: point.pageY\n          }\n        });\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"handlePortalUpdate\", function () {\n        if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n          _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n        }\n      });\n\n      _defineProperty(_assertThisInitialized(_this), \"triggerContextValue\", {\n        onPopupMouseDown: _this.onPopupMouseDown\n      });\n\n      var _popupVisible;\n\n      if ('popupVisible' in props) {\n        _popupVisible = !!props.popupVisible;\n      } else {\n        _popupVisible = !!props.defaultPopupVisible;\n      }\n\n      _this.state = {\n        prevPopupVisible: _popupVisible,\n        popupVisible: _popupVisible\n      };\n      ALL_HANDLERS.forEach(function (h) {\n        _this[\"fire\".concat(h)] = function (e) {\n          _this.fireEvents(h, e);\n        };\n      });\n      return _this;\n    }\n\n    _createClass(Trigger, [{\n      key: \"componentDidMount\",\n      value: function componentDidMount() {\n        this.componentDidUpdate();\n      }\n    }, {\n      key: \"componentDidUpdate\",\n      value: function componentDidUpdate() {\n        var props = this.props;\n        var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n        // https://github.com/ant-design/ant-design/issues/5804\n        // https://github.com/react-component/calendar/issues/250\n        // https://github.com/react-component/trigger/issues/50\n\n        if (state.popupVisible) {\n          var currentDocument;\n\n          if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n            currentDocument = props.getDocument(this.getRootDomNode());\n            this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n          } // always hide on mobile\n\n\n          if (!this.touchOutsideHandler) {\n            currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n            this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n          } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n          if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n            currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n            this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n          } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n          if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n            this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n          }\n\n          return;\n        }\n\n        this.clearOutsideHandler();\n      }\n    }, {\n      key: \"componentWillUnmount\",\n      value: function componentWillUnmount() {\n        this.clearDelayTimer();\n        this.clearOutsideHandler();\n        clearTimeout(this.mouseDownTimeout);\n        raf.cancel(this.attachId);\n      }\n    }, {\n      key: \"getPopupDomNode\",\n      value: function getPopupDomNode() {\n        var _this$popupRef$curren2;\n\n        // for test\n        return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n      }\n    }, {\n      key: \"getPopupAlign\",\n      value: function getPopupAlign() {\n        var props = this.props;\n        var popupPlacement = props.popupPlacement,\n            popupAlign = props.popupAlign,\n            builtinPlacements = props.builtinPlacements;\n\n        if (popupPlacement && builtinPlacements) {\n          return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n        }\n\n        return popupAlign;\n      }\n    }, {\n      key: \"setPopupVisible\",\n      value:\n      /**\n       * @param popupVisible    Show or not the popup element\n       * @param event           SyntheticEvent, used for `pointAlign`\n       */\n      function setPopupVisible(popupVisible, event) {\n        var alignPoint = this.props.alignPoint;\n        var prevPopupVisible = this.state.popupVisible;\n        this.clearDelayTimer();\n\n        if (prevPopupVisible !== popupVisible) {\n          if (!('popupVisible' in this.props)) {\n            this.setState({\n              popupVisible: popupVisible,\n              prevPopupVisible: prevPopupVisible\n            });\n          }\n\n          this.props.onPopupVisibleChange(popupVisible);\n        } // Always record the point position since mouseEnterDelay will delay the show\n\n\n        if (alignPoint && event && popupVisible) {\n          this.setPoint(event);\n        }\n      }\n    }, {\n      key: \"delaySetPopupVisible\",\n      value: function delaySetPopupVisible(visible, delayS, event) {\n        var _this2 = this;\n\n        var delay = delayS * 1000;\n        this.clearDelayTimer();\n\n        if (delay) {\n          var point = event ? {\n            pageX: event.pageX,\n            pageY: event.pageY\n          } : null;\n          this.delayTimer = window.setTimeout(function () {\n            _this2.setPopupVisible(visible, point);\n\n            _this2.clearDelayTimer();\n          }, delay);\n        } else {\n          this.setPopupVisible(visible, event);\n        }\n      }\n    }, {\n      key: \"clearDelayTimer\",\n      value: function clearDelayTimer() {\n        if (this.delayTimer) {\n          clearTimeout(this.delayTimer);\n          this.delayTimer = null;\n        }\n      }\n    }, {\n      key: \"clearOutsideHandler\",\n      value: function clearOutsideHandler() {\n        if (this.clickOutsideHandler) {\n          this.clickOutsideHandler.remove();\n          this.clickOutsideHandler = null;\n        }\n\n        if (this.contextMenuOutsideHandler1) {\n          this.contextMenuOutsideHandler1.remove();\n          this.contextMenuOutsideHandler1 = null;\n        }\n\n        if (this.contextMenuOutsideHandler2) {\n          this.contextMenuOutsideHandler2.remove();\n          this.contextMenuOutsideHandler2 = null;\n        }\n\n        if (this.touchOutsideHandler) {\n          this.touchOutsideHandler.remove();\n          this.touchOutsideHandler = null;\n        }\n      }\n    }, {\n      key: \"createTwoChains\",\n      value: function createTwoChains(event) {\n        var childPros = this.props.children.props;\n        var props = this.props;\n\n        if (childPros[event] && props[event]) {\n          return this[\"fire\".concat(event)];\n        }\n\n        return childPros[event] || props[event];\n      }\n    }, {\n      key: \"isClickToShow\",\n      value: function isClickToShow() {\n        var _this$props4 = this.props,\n            action = _this$props4.action,\n            showAction = _this$props4.showAction;\n        return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n      }\n    }, {\n      key: \"isContextMenuOnly\",\n      value: function isContextMenuOnly() {\n        var action = this.props.action;\n        return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n      }\n    }, {\n      key: \"isContextMenuToShow\",\n      value: function isContextMenuToShow() {\n        var _this$props5 = this.props,\n            action = _this$props5.action,\n            showAction = _this$props5.showAction;\n        return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n      }\n    }, {\n      key: \"isClickToHide\",\n      value: function isClickToHide() {\n        var _this$props6 = this.props,\n            action = _this$props6.action,\n            hideAction = _this$props6.hideAction;\n        return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n      }\n    }, {\n      key: \"isMouseEnterToShow\",\n      value: function isMouseEnterToShow() {\n        var _this$props7 = this.props,\n            action = _this$props7.action,\n            showAction = _this$props7.showAction;\n        return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n      }\n    }, {\n      key: \"isMouseLeaveToHide\",\n      value: function isMouseLeaveToHide() {\n        var _this$props8 = this.props,\n            action = _this$props8.action,\n            hideAction = _this$props8.hideAction;\n        return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n      }\n    }, {\n      key: \"isFocusToShow\",\n      value: function isFocusToShow() {\n        var _this$props9 = this.props,\n            action = _this$props9.action,\n            showAction = _this$props9.showAction;\n        return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n      }\n    }, {\n      key: \"isBlurToHide\",\n      value: function isBlurToHide() {\n        var _this$props10 = this.props,\n            action = _this$props10.action,\n            hideAction = _this$props10.hideAction;\n        return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n      }\n    }, {\n      key: \"forcePopupAlign\",\n      value: function forcePopupAlign() {\n        if (this.state.popupVisible) {\n          var _this$popupRef$curren3;\n\n          (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n        }\n      }\n    }, {\n      key: \"fireEvents\",\n      value: function fireEvents(type, e) {\n        var childCallback = this.props.children.props[type];\n\n        if (childCallback) {\n          childCallback(e);\n        }\n\n        var callback = this.props[type];\n\n        if (callback) {\n          callback(e);\n        }\n      }\n    }, {\n      key: \"close\",\n      value: function close() {\n        this.setPopupVisible(false);\n      }\n    }, {\n      key: \"render\",\n      value: function render() {\n        var popupVisible = this.state.popupVisible;\n        var _this$props11 = this.props,\n            children = _this$props11.children,\n            forceRender = _this$props11.forceRender,\n            alignPoint = _this$props11.alignPoint,\n            className = _this$props11.className,\n            autoDestroy = _this$props11.autoDestroy;\n        var child = React.Children.only(children);\n        var newChildProps = {\n          key: 'trigger'\n        }; // ============================== Visible Handlers ==============================\n        // >>> ContextMenu\n\n        if (this.isContextMenuToShow()) {\n          newChildProps.onContextMenu = this.onContextMenu;\n        } else {\n          newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n        } // >>> Click\n\n\n        if (this.isClickToHide() || this.isClickToShow()) {\n          newChildProps.onClick = this.onClick;\n          newChildProps.onMouseDown = this.onMouseDown;\n          newChildProps.onTouchStart = this.onTouchStart;\n        } else {\n          newChildProps.onClick = this.createTwoChains('onClick');\n          newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n          newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n        } // >>> Hover(enter)\n\n\n        if (this.isMouseEnterToShow()) {\n          newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n          if (alignPoint) {\n            newChildProps.onMouseMove = this.onMouseMove;\n          }\n        } else {\n          newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n        } // >>> Hover(leave)\n\n\n        if (this.isMouseLeaveToHide()) {\n          newChildProps.onMouseLeave = this.onMouseLeave;\n        } else {\n          newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n        } // >>> Focus\n\n\n        if (this.isFocusToShow() || this.isBlurToHide()) {\n          newChildProps.onFocus = this.onFocus;\n          newChildProps.onBlur = this.onBlur;\n        } else {\n          newChildProps.onFocus = this.createTwoChains('onFocus');\n          newChildProps.onBlur = this.createTwoChains('onBlur');\n        } // =================================== Render ===================================\n\n\n        var childrenClassName = classNames(child && child.props && child.props.className, className);\n\n        if (childrenClassName) {\n          newChildProps.className = childrenClassName;\n        }\n\n        var cloneProps = _objectSpread({}, newChildProps);\n\n        if (supportRef(child)) {\n          cloneProps.ref = composeRef(this.triggerRef, child.ref);\n        }\n\n        var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n        var portal; // prevent unmounting after it's rendered\n\n        if (popupVisible || this.popupRef.current || forceRender) {\n          portal = /*#__PURE__*/React.createElement(PortalComponent, {\n            key: \"portal\",\n            getContainer: this.getContainer,\n            didUpdate: this.handlePortalUpdate\n          }, this.getComponent());\n        }\n\n        if (!popupVisible && autoDestroy) {\n          portal = null;\n        }\n\n        return /*#__PURE__*/React.createElement(TriggerContext.Provider, {\n          value: this.triggerContextValue\n        }, trigger, portal);\n      }\n    }], [{\n      key: \"getDerivedStateFromProps\",\n      value: function getDerivedStateFromProps(_ref, prevState) {\n        var popupVisible = _ref.popupVisible;\n        var newState = {};\n\n        if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n          newState.popupVisible = popupVisible;\n          newState.prevPopupVisible = prevState.popupVisible;\n        }\n\n        return newState;\n      }\n    }]);\n\n    return Trigger;\n  }(React.Component);\n\n  _defineProperty(Trigger, \"contextType\", TriggerContext);\n\n  _defineProperty(Trigger, \"defaultProps\", {\n    prefixCls: 'rc-trigger-popup',\n    getPopupClassNameFromAlign: returnEmptyString,\n    getDocument: returnDocument,\n    onPopupVisibleChange: noop,\n    afterPopupVisibleChange: noop,\n    onPopupAlign: noop,\n    popupClassName: '',\n    mouseEnterDelay: 0,\n    mouseLeaveDelay: 0.1,\n    focusDelay: 0,\n    blurDelay: 0.15,\n    popupStyle: {},\n    destroyPopupOnHide: false,\n    popupAlign: {},\n    defaultPopupVisible: false,\n    mask: false,\n    maskClosable: true,\n    action: [],\n    showAction: [],\n    hideAction: [],\n    autoDestroy: false\n  });\n\n  return Trigger;\n}\nexport default generateTrigger(Portal);"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,sBAAsB,MAAM,kDAAkD;AACrF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,QAAQ,MAAM,WAAW;AAChC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,OAAOC,WAAW,MAAM,4BAA4B;AACpD,SAASC,UAAU,EAAEC,UAAU,QAAQ,gBAAgB;AACvD,OAAOC,gBAAgB,MAAM,iCAAiC;AAC9D,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,qBAAqB,EAAEC,sBAAsB,QAAQ,mBAAmB;AACjF,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,cAAc,MAAM,WAAW;AAEtC,SAASC,IAAI,GAAG,CAAC;AAEjB,SAASC,iBAAiB,GA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